Build without libsoup again
authorColin Walters <walters@verbum.org>
Wed, 10 Jul 2013 00:31:55 +0000 (20:31 -0400)
committerColin Walters <walters@verbum.org>
Wed, 10 Jul 2013 00:35:15 +0000 (20:35 -0400)
Makefile-ostree.am
src/libostree/ostree-repo.c
src/ostree/main.c

index 44cc58818dad0d6dd824a1c1d806c3b6b4baa098..d5eaacdec49615f13bd6c7365af4eef234435cab 100644 (file)
@@ -38,7 +38,6 @@ ostree_SOURCES = src/ostree/main.c \
        src/ostree/ot-builtin-remote.c \
        src/ostree/ot-builtin-rev-parse.c \
        src/ostree/ot-builtin-show.c \
-       src/ostree/ot-builtin-trivial-httpd.c \
        src/ostree/ot-builtin-write-refs.c \
        src/ostree/ot-main.h \
        src/ostree/ot-main.c \
@@ -79,7 +78,10 @@ ostree_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS)
 ostree_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS)
 
 if USE_LIBSOUP
-ostree_SOURCES += src/ostree/ot-builtin-pull.c
+ostree_SOURCES += \
+       src/ostree/ot-builtin-pull.c \
+       src/ostree/ot-builtin-trivial-httpd.c \
+       $(NULL)
 ostree_CFLAGS += $(OT_INTERNAL_SOUP_CFLAGS)
 ostree_LDADD += $(OT_INTERNAL_SOUP_LIBS)
 endif
index a151b7136585476c0f0c00d340b5e67548e4bc58..bd891976a27d8d5f833b7ab9f817e75643964849 100644 (file)
@@ -2325,3 +2325,18 @@ ostree_repo_read_commit (OstreeRepo *self,
  out:
   return ret;
 }
+
+#ifndef HAVE_LIBSOUP
+gboolean
+ostree_repo_pull (OstreeRepo               *repo,
+                  const char               *remote_name,
+                  char                    **refs_to_fetch,
+                  OstreeRepoPullFlags       flags,
+                  GCancellable             *cancellable,
+                  GError                  **error)
+{
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                       "This version of ostree was built without libsoup, and cannot fetch over HTTP");
+  return FALSE;
+}
+#endif
index da6db63843315ab61a03c9f6dd3c3529bdf1c926..3863a143c51bd40b0d946c0736cdf3cdcfec20de 100644 (file)
@@ -44,12 +44,16 @@ static OstreeCommand commands[] = {
   { "ls", ostree_builtin_ls, 0 },
   { "refs", ostree_builtin_refs, 0 },
   { "prune", ostree_builtin_prune, 0 },
+#ifdef HAVE_LIBSOUP 
   { "pull", ostree_builtin_pull, 0 },
+#endif
   { "pull-local", ostree_builtin_pull_local, 0 },
   { "remote", ostree_builtin_remote, 0 },
   { "rev-parse", ostree_builtin_rev_parse, 0 },
   { "show", ostree_builtin_show, 0 },
+#ifdef HAVE_LIBSOUP 
   { "trivial-httpd", ostree_builtin_trivial_httpd, OSTREE_BUILTIN_FLAG_NO_REPO },
+#endif
   { "write-refs", ostree_builtin_write_refs, 0 },
   { NULL }
 };